<div class="toolbar">
  <button nz-button [nzType]="'primary'" (click)="isVisible = true">添加数据模板</button>
  <button nz-button [disabled]="true" [nzType]="'danger'" (click)="batchDel()">批量删除</button>
</div>
<nz-table
  #ajaxTable
  [nzShowSizeChanger]="true"
  [nzFrontPagination]="false"
  [nzData]="data"
  [nzLoading]="loading"
  [nzTotal]="100"
  (nzCurrentPageDataChange)="currentPageDataChange($event)">
  <thead>
  <tr>
    <th [nzShowCheckbox]="true"
        [(nzChecked)]="allChecked"
        [nzIndeterminate]="indeterminate"
        (nzCheckedChange)="checkAll($event)"></th>
    <th>批次号</th>
    <th>模板名称</th>
    <th>创建日期</th>
    <th>修改日期</th>
    <th>文档格式</th>
    <th>有效状态</th>
    <th>操作</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let data of ajaxTable.data">
    <td [nzShowCheckbox]="true" [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus($event)"></td>
    <td>{{data.batchNumber}}</td>
    <td>{{data.name}}</td>
    <td>{{data.createTime}}</td>
    <td>{{data.modifyTime}}</td>
    <td>{{data.format}}</td>
    <td>
      <nz-badge nzStatus="success" *ngIf="data.enable==1" nzText="启用"></nz-badge>
      <nz-badge nzStatus="error" *ngIf="data.enable==0" nzText="禁用"></nz-badge>
    </td>
    <td>
      <button nz-button [nzType]="'default'">编辑</button>
      <nz-dropdown>
        <button nz-button nz-dropdown><span>更多操作</span> <i class="anticon anticon-down"></i></button>
        <ul nz-menu>
          <li nz-menu-item>启用</li>
          <li nz-menu-item>禁用</li>
          <li nz-menu-item>删除</li>
        </ul>
      </nz-dropdown>
    </td>
  </tr>
  </tbody>
</nz-table>
<nz-modal [(nzVisible)]="isVisible"
          [nzTitle]="'添加数据模板'"
          [nzOkText]="'保存'"
          [nzMaskClosable]="false"
          [nzWidth]="'1024'"
          (nzOnOk)="false"
          (nzOnCancel)="isVisible = false">

</nz-modal>
